package com.starry.home.logic.network

import com.starry.home.logic.model.hospital.DoctorInfoBean
import com.starry.home.logic.model.hospital.DoctorResponseBean
import com.starry.home.logic.model.hospital.RegisterBean
import com.starry.home.logic.model.hospital.RegisterResponseBean
import com.starry.home.logic.model.hospital.SectionResponseBean
import com.starry.home.logic.model.hospital.YsByNameBean
import com.starry.home.logic.model.login.LoginBean
import com.starry.home.logic.model.login.LoginResponseBean
import com.starry.home.logic.model.login.ResponseBean
import com.starry.home.logic.model.login.UserInfoBean
import com.starry.home.logic.model.login.UserInfoResponseBean
import com.starry.home.logic.model.medical.MedicalBean
import com.starry.home.logic.model.medical.XyMedicalBean
import com.starry.home.logic.model.medical.ZyMedicalBean
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET

import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query
import retrofit2.http.QueryMap


/**
 * Package:com.starry.dotpen_patients.logic.network.service
 * Author:starr
 * Time:2024/1/30 21:56
 * Description: 登录模块接口
 */
interface HomeService {

    /**
     * 患者登录
     */
    @POST("app/user_login")
    fun login(@Body param: LoginBean): Call<LoginResponseBean?>

    /**
     * 患者注册
     */
    @POST("app/user_register")
    fun register(@Body param: LoginBean): Call<LoginResponseBean?>

    /**
     * 更新患者信息
     */
    @POST("hospital/emrhzinfo/update")
    fun updateUserInfo(@Body userInfo: UserInfoBean): Call<ResponseBean>

    /**
     * 获取患者信息
     */
    @GET("hospital/emrhzinfo/info/{emrHzId}")
    fun getUserInfo(@Path("emrHzId") emrHzId: Int): Call<UserInfoResponseBean>

    /**
     * 科室列表
     */
    @GET("hospital/emrksinfo/list")
    fun getKsList(@Query("params") params: Int): Call<SectionResponseBean>

    /**
     * 根据科室名称获取医生列表
     */
    @GET("hospital/emrysinfo/getYsListBySection")
    fun getDoctorList(@Query("ysSection") ysSection: String): Call<DoctorResponseBean>

    /**
     * 获取医生信息
     */
    @GET("hospital/emrysinfo/info/{emrYsId}")
    fun getYsInfo(@Path("emrYsId") ysId: Int): Call<DoctorInfoBean>

    /**
     * 患者挂号
     */
    @POST("hospital/emrghinfo/save")
    fun saveRegister(@Body registerBean: RegisterBean): Call<ResponseBean>

    /**
     * 查询患者的挂号信息
     */
    @GET("hospital/emrghinfo/getGhListByHzId")
    fun getRegisterList(@Query("hzId") hzInt: Int):Call<RegisterResponseBean>

    /**
     * 查询近期待就诊
     */
    @GET("hospital/emrghinfo/getGhListByHzIdAndWeek")
    fun getGhListByHzIdAndWeek(@Query("hzId") hzInt: Int):Call<RegisterResponseBean>

    /**
     * 根据姓名查询医生
     */
    @GET("hospital/emrysinfo/info_param")
    fun queryYsByName(@QueryMap param: HashMap<String,String>): Call<YsByNameBean>

    /**
     * 根据患者查询病历编号
     */

    /**
     * 根据病历编号查询西医病历信息
     */
    @GET("hospital/emrjdinfo/getXyJdByBlId")
    fun getXyJdByBlId(@Query("blId") blId: Int): Call<XyMedicalBean>

    /**
     * 根据病历编号查询中医病历信息
     */
    @GET("hospital/emrjdinfo/getZyJdByBlId")
    fun getZyJdByBlId(@Query("blId") blId: Int): Call<ZyMedicalBean>

    /**
     * 根据患者编号查询病历编号
     * hospital/emrblinfo/getBlByHzId?hzId=2
     */
    @POST("hospital/emrblinfo/getBlByHzId")
    fun getBlIdByHzId(@Query("hzId") hzId: Int): Call<MedicalBean>

    /**
     * 新建病历
     */
    @POST("hospital/emrblinfo/save")
    fun saveBook(@Body medicalBean: MedicalBean.BlEntity): Call<ResponseBean>
}